<template>
  <div id="app" ref="charts" style="width: 400px;height: 80px">
  </div>
</template>

<script>
import * as echarts from 'echarts'

export default {
  name: 'index',
//  初始化页面完成后对dom节点进行操作
  mounted() {
    //初始化
    let chartsType = echarts.init(this.$refs.charts)
    //选项
    chartsType.setOption({
      xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          data: [120, 200, 150, 80, 70, 110, 130],
          type: 'bar'
        }
      ]
    })
  }

}
</script>

<style scoped>

</style>
